package com.tamtamy.jtta.data.xml;

import org.w3c.dom.Document;

import com.tamtamy.jtta.data.Notice;
import com.tamtamy.jtta.utility.XMLUtility;

public class XMLNotice extends Notice{
	
	public XMLNotice(Document xmlDocument){
		super();
		this.id = Long.parseLong(XMLUtility.getString(xmlDocument, "id"));
		this.created = XMLUtility.getDate(xmlDocument, "created");
		this.userId = XMLUtility.getString(xmlDocument, "userId");
		this.noticeType = XMLUtility.getString(xmlDocument, "noticeType");
		this.targetId = XMLUtility.getString(xmlDocument, "targetId");
		this.title = XMLUtility.getString(xmlDocument, "title");
		this.description = XMLUtility.getString(xmlDocument, "description");
		this.permalink = XMLUtility.getString(xmlDocument, "permalink");
		this.thumbnailPresent = Boolean.parseBoolean(XMLUtility.getString(xmlDocument, "thumbnailPresent"));
		this.thumbnailSmall = XMLUtility.getString(xmlDocument, "thumbnailSmall");
		this.thumbnailRect = XMLUtility.getString(xmlDocument, "thumbnailRect");
		this.thumbnailMedium = XMLUtility.getString(xmlDocument, "targethumbnailMediumtId");
		this.thumbnailOriginal = XMLUtility.getString(xmlDocument, "thumbnailOriginal");
	}

}
